//
//  STHairProImgView.m
//  YiYueHairdresser
//
//  Created by zhouzhouzhou on 2018/10/10.
//  Copyright © 2018年 YuYiLian. All rights reserved.
//

#import "STHairProImgView.h"

@implementation STHairProImgView


-(void)setHairProjectImgWithData:(NSArray *)proImgs{
    arrPros = proImgs;
    [self loadProjectImgsView];
    if (!self.moreBtn ) {
        self.moreBtn = [[UIButton alloc]initWithFrame:CGRectMake((self.frame.size.width-80)/2, (self.frame.size.height-80)/2, 80, 80)];
        [self.moreBtn setBackgroundImage:[UIImage imageNamed:@"h-seemore"] forState:UIControlStateNormal];
        self.moreBtn.backgroundColor = [UIColor blackColor];
        self.moreBtn.layer.cornerRadius =CGRectGetHeight(self.moreBtn.frame)/2 ;
        self.moreBtn.layer.masksToBounds = YES;
        //    self.moreBtn.alpha = 0.3;
        [self addSubview:self.moreBtn];
    }
   
}

-(void)loadProjectImgsView{
    if(!proCollectionView){
        proCollectionView=[[STShowColListView alloc]initWithFrame:self.bounds];
        float w = (self.frame.size.width-(2*10+1)) / 3;
        float h =  (self.frame.size.height-(10+1)) / 2;
        proCollectionView.cellSize = CGSizeMake(w, h);
        proCollectionView.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0);
        //    proCollectionView.delegate = self;
        proCollectionView.showViewClassName = @"STProjectImgView";
        [self addSubview:proCollectionView];
    }
    [proCollectionView setShowCollectionViewWithData:arrPros];
        
    
}



@end
